﻿using System;

namespace OpenWaves.EPiServer.ExtendedContentAreaEditor
{
    [AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
    public class ContentAreaSupportedTypesAttribute: Attribute
    {
        public Type[] SupportedTypes { get; set; }

        public ContentAreaSupportedTypesAttribute()
        {
        }

        public ContentAreaSupportedTypesAttribute(params Type[] supportedTypes)
        {
            if (supportedTypes == null || supportedTypes.Length == 0)
            {
                throw new ArgumentNullException("supportedTypes", "SupportedTypes cannot be empty");
            }
            this.SupportedTypes = supportedTypes;
        }
    }
}